package com.example.xungeng2.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.xungeng2.mapper.XgpqMapper;
import com.example.xungeng2.pojo.Xgpq;
import com.example.xungeng2.service.XgpqService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class XgpqServiceImpl extends ServiceImpl<XgpqMapper, Xgpq> implements XgpqService {
    @Override
    public ArrayList<Xgpq> selectAll() {
        LambdaQueryWrapper<Xgpq> wrapper = new LambdaQueryWrapper<>();
        ArrayList<Xgpq> xgpqs = (ArrayList<Xgpq>) baseMapper.selectList(wrapper);
        return xgpqs;
    }

    @Override
    public Page<Xgpq> pageAll(int i, int i1) {
        Page<Xgpq> xgpqPage = baseMapper.selectPage(new Page<Xgpq>(i, i1), null);
        return xgpqPage;
    }
}
